package org.simple.controller;

        import org.simple.service.IVerifycodeService;
        import org.simple.util.AjaxResult;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.bind.annotation.*;

        import java.util.Map;

@RestController
@RequestMapping("/verifycode")
public class VerifycodeController {
    @Autowired
    private IVerifycodeService verifycodeService;
    /**
     *
     * @return base64图片值
     */
    @PostMapping("/imageCode/{imageCodeKey}")
    public String imageCode(@PathVariable("imageCodeKey") String imageCodeKey)
    {
        return verifycodeService.getImageCode(imageCodeKey);
    }
    @PostMapping("/sendSmsCode")
    public AjaxResult sendSmsCode(@RequestBody Map<String,String> params)
    {

        return verifycodeService.sendSmsCode(params);

    }


}
